<div class="empresas view">
<h2><?php  echo __('Empresa').' '.$empresa['Empresa']['nome'];?></h2>
	<dl>
		<dt><?php echo __('Id Empresas'); ?></dt>
		<dd>
			<?php echo h($empresa['Empresa']['id_empresas']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Nome'); ?></dt>
		<dd>
			<?php echo h($empresa['Empresa']['nome']); ?>
			&nbsp;
		</dd>
	</dl>
	<h3><?php echo __('Related Users');?></h3>
	<?php if (!empty($empresa['User'])):?>
	<table class="table table-striped table-hover">
	<tr>
		<th><?php echo __('Username'); ?></th>
		<th><?php echo __('Nome'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($empresa['User'] as $user): ?>
		<tr>
			<td><?php echo $user['username'];?></td>
			<td><?php echo $user['nome'];?></td>
			<td>
				<div class="btn-toolbar">
					<div class="btn-group">
						<?php echo $this->Html->link("<i class=icon-search></i>", array('controller' => 'users', 'action' => 'view', $user['id_users']), array('class'=>'btn', 'escape'=>false, 'title'=>__('View'))); ?>
						<?php echo $this->Html->link("<i class=icon-edit></i>", array('controller' => 'users', 'action' => 'edit', $user['id_users']), array('class'=>'btn', 'escape'=>false, 'title'=>__('Edit'))); ?>
						<?php echo $this->Form->postLink("<i class=icon-trash></i>", array('controller' => 'users', 'action' => 'delete', $user['id_users']), array('class'=>'btn', 'escape'=>false, 'title'=>__('Delete')), __('Are you sure you want to delete # %s?', $user['id_users'])); ?>
					</div>
				</div>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
	<h3><?php echo __('Related Projetos');?></h3>
	<?php if (!empty($empresa['Projeto'])):?>
	<table class="table table-striped table-hover">
	<tr>
		<th><?php echo __('Nome'); ?></th>
		<th><?php echo __('Link'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($empresa['Projeto'] as $projeto): ?>
		<tr>
			<td><?php echo $projeto['nome'];?></td>
			<td><?php echo $projeto['link'];?></td>
			<td>
				<div class="btn-toolbar">
					<div class="btn-group">
						<?php echo $this->Html->link("<i class=icon-search></i>", array('controller' => 'projetos', 'action' => 'view', $projeto['id_projetos']), array('class'=>'btn', 'escape'=>false, 'title'=>__('View'))); ?>
						<?php echo $this->Html->link("<i class=icon-edit></i>", array('controller' => 'projetos', 'action' => 'edit', $projeto['id_projetos']), array('class'=>'btn', 'escape'=>false, 'title'=>__('Edit'))); ?>
						<?php echo $this->Form->postLink("<i class=icon-trash></i>", array('controller' => 'projetos', 'action' => 'delete', $projeto['id_projetos']), array('class'=>'btn', 'escape'=>false, 'title'=>__('Delete')), __('Are you sure you want to delete # %s?', $projeto['id_projetos'])); ?>
					</div>
				</div>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
</div>